#include "src/defined.h"
#include "src/libraries/config.h"
void ReadConfig(targs* needed, const char* cfile)
{
	ConfigFile cf(cfile);

	if (cf.ValueExists("server")) needed->server = cf.GetValue_String("server");
	else needed->server = "216.66.76.220";

	if (cf.ValueExists("port")) needed->port = cf.GetValue_Int("port");
	else needed->port = 6030;

	if (cf.ValueExists("telnetpass")) needed->telnetpass = cf.GetValue_String("telnetpass");
	else needed->telnetpass = "telnet2";

	if (cf.ValueExists("username")) needed->username = cf.GetValue_String("username");
	else needed->username = "";

	if (cf.ValueExists("userpass")) needed->userpass = cf.GetValue_String("userpass");
	else needed->userpass = "";
}
